package com.jfirer.validator.path.node;

import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
import javax.validation.ElementKind;
import javax.validation.Path.MethodNode;

public class MethodNodeImpl extends NodeImpl implements MethodNode
{
	private List<Class<?>> parameterTypes = new ArrayList<Class<?>>();
	
	public MethodNodeImpl(Method method)
	{
		for (Class<?> each : method.getParameterTypes())
		{
			parameterTypes.add(each);
		}
		setName(method.getName());
		setElementKind(ElementKind.METHOD);
	}
	
	@Override
	public List<Class<?>> getParameterTypes()
	{
		return parameterTypes;
	}
	
}
